package com.yxx.common.global;

public final class Constant {
	
	/** 公共连接符号(:)*/
	public static final String COMM_COLON = ":";
	/** 公共连接符号(,)*/
	public static final String  COMM_COMMA = ",";
	
	public static final String SESSION_USER_KEY = "session_user_key";
	
	public static final String SHIRO_ERROR_TYPE_KEY = "error_type_key";
	
	/** 表示可匿名使用,可以理解为匿名用户或游客*/
	public static final String SHIRO_PERMISSIONS_ANON_KEY = "anon";
	/** 表示需认证才能使用*/
	public static final String SHIRO_PERMISSIONS_AUTHC_KEY = "authc";
	/** 表示httpBasic认证*/
	public static final String SHIRO_PERMISSIONS_AUTHCBASIC_KEY = "authcBasic";
	
	public static final String SHIRO_PERMISSIONS_LOGOUT_KEY = "logout";
	
	public static final String SHIRO_PERMISSIONS_NOSESSIONCREATION_KEY = "noSessionCreation";
	
	/** 参数可写多个,多参时必须加上引号,且参数之间用逗号分割,如/admins/user/**=perms["user:add:*,user:modify:*"]
	 * 当有多个参数时必须每个参数都通过才算通过,相当于isPermitedAll()方法
	 */
	public static final String SHIRO_PERMISSIONS_PERMS_KEY = "perms";
	/** 当请求的URL端口不是8081时,跳转到schemal://serverName:8081?queryString
	 * 其中schmal是协议http或https等,serverName是你访问的Host,8081是Port端口,queryString是你访问的URL里的?后面的参数
	*/
	public static final String SHIRO_PERMISSIONS_PORT_KEY = "port";
	/** 根据请求的方法,相当于/admins/user/**=perms[user:method],其中method为post,get,delete等*/
	public static final String SHIRO_PERMISSIONS_REST_KEY = "rest";
	/**  参数可写多个,多个时必须加上引号,且参数之间用逗号分割,如/admins/user/**=roles["admin,guest"]
	 * 当有多个参数时必须每个参数都通过才算通过,相当于hasAllRoles()方法
	*/
	public static final String SHIRO_PERMISSIONS_ROLES_KEY = "roles";
	/** 表示安全的URL请求,协议为https*/
	public static final String SHIRO_PERMISSIONS_SSL_KEY = "ssl";
	/** 表示必须存在用户,当登入操作时不做检查*/
	public static final String SHIRO_PERMISSIONS_USER_KEY = "user";
	
	// 模块名称
	/** 角色*/
	public static final String MODULE_ROLE_KEY = "sys/role";
	/** 菜单*/
	public static final String MODULE_AUTHIRITY_KEY = "sys/permission";
	/** 用户*/
	public static final String MODULE_USER_KEY = "sys/user";
	
	
	// ******************************************************
	// ************************权限表示常量**********************
	// ******************************************************
	
	public static final String PATTERN1 = "%s";
	public static final String PATTERN2 = "%s:%s";
	public static final String PATTERN3 = "%s:%s:%s";
	/** 公共展示权限*/
	public static final String PERM_COMM_VIEW = "view";
	/** 公共编辑权限*/
	public static final String PERM_COMM_EDIT = "edit";
	/** 公共保存权限*/
	public static final String PERM_COMM_SAVE = "save";
	/** 公共删除权限*/
	public static final String PERM_COMM_DEL = "del";
	/** 系统模块*/
	public static final String PERM_MODULE_SYS = "sys";
	/** 角色角色*/
	public static final String PERM_SYS_ROLE = "role";
	/** 菜单管理*/
	public static final String PERM_SYS_AUTH = "auth";
	/** 菜单管理*/
	public static final String PERM_SYS_USER = "user";
	
	
	
}
